<?php namespace App\Repositories\Tag;

interface TagRepositoryInterface
{

    /**
     * 获取tag信息
     *
     * @param $name
     *
     * @return \Illuminate\Database\Eloquent\Model|null|\App\Models\Tag
     */
    public function getByName($name);

    /**
     * 新增tag
     *
     * @param $user_id
     * @param $name
     *
     * @return Tag|\Illuminate\Database\Eloquent\Model|null|\App\Models\Tag
     */
    public function store($user_id, $name);

    /**
     * 获取系统指定类型的标签
     *
     * @param $type
     *
     * @return \Illuminate\Database\Eloquent\Collection|\Illuminate\Support\Collection|\App\Models\Tag[]
     */
    public function getByType($type);
}
